#!/bin/bash

buildRoot=/build
installDstRoot=/usr/local

srcRoot=$buildRoot/src
buildTmpRoot=$buildRoot/tmp
pkgRoot=$buildRoot/pkg

mkdir -p $buildTmpRoot
cd $buildTmpRoot

echo $srcRoot
tar zxvf $srcRoot/LuaJIT-2.0.3.tar.gz
cd LuaJIT-2.0.3
make install PREFIX=$installDstRoot/luajit-2.0.3

cd $installDstRoot
tar zcvf luajit-2.0.3.tar.gz luajit-2.0.3
cp luajit-2.0.3.tar.gz $pkgRoot
